From 9a1841402ce3ef21a10a7314a07a615f8196d406 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 21 Jan 2022 22:19:37 -0800
Subject: [PATCH] Adjust for musl headers

Upstream-Status: Inappropriate [musl specific]

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 src/libsystemd-network/sd-dhcp6-client.c      | 2 +-
 src/network/netdev/bareudp.c                  | 2 +-
 src/network/netdev/batadv.c                   | 2 +-
 src/network/netdev/bond.c                     | 2 +-
 src/network/netdev/bridge.c                   | 2 +-
 src/network/netdev/dummy.c                    | 2 +-
 src/network/netdev/geneve.c                   | 2 +-
 src/network/netdev/ifb.c                      | 2 +-
 src/network/netdev/ipoib.c                    | 2 +-
 src/network/netdev/ipvlan.c                   | 2 +-
 src/network/netdev/macsec.c                   | 2 +-
 src/network/netdev/macvlan.c                  | 2 +-
 src/network/netdev/netdev.c                   | 2 +-
 src/network/netdev/netdevsim.c                | 2 +-
 src/network/netdev/nlmon.c                    | 2 +-
 src/network/netdev/tunnel.c                   | 2 +-
 src/network/netdev/vcan.c                     | 2 +-
 src/network/netdev/veth.c                     | 2 +-
 src/network/netdev/vlan.c                     | 2 +-
 src/network/netdev/vrf.c                      | 2 +-
 src/network/netdev/vxcan.c                    | 2 +-
 src/network/netdev/vxlan.c                    | 2 +-
 src/network/netdev/wireguard.c                | 2 +-
 src/network/netdev/xfrm.c                     | 2 +-
 src/network/networkd-bridge-mdb.c             | 4 ++--
 src/network/networkd-dhcp-common.c            | 3 ++-
 src/network/networkd-dhcp-prefix-delegation.c | 4 ++--
 src/network/networkd-dhcp-server.c            | 2 +-
 src/network/networkd-dhcp4.c                  | 2 +-
 src/network/networkd-ipv6ll.c                 | 2 +-
 src/network/networkd-link.c                   | 2 +-
 src/network/networkd-ndisc.c                  | 2 +-
 src/network/networkd-route.c                  | 8 ++++----
 src/network/networkd-setlink.c                | 2 +-
 src/shared/linux/ethtool.h                    | 3 ++-
 src/shared/netif-util.c                       | 2 +-
 src/udev/udev-builtin-net_id.c                | 2 +-
 37 files changed, 44 insertions(+), 42 deletions(-)

--- a/src/libsystemd-network/sd-dhcp6-client.c
+++ b/src/libsystemd-network/sd-dhcp6-client.c
@@ -5,7 +5,7 @@
 
 #include <errno.h>
 #include <sys/ioctl.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/if_infiniband.h>
 
 #include "sd-dhcp6-client.h"
--- a/src/network/netdev/bareudp.c
+++ b/src/network/netdev/bareudp.c
@@ -2,7 +2,7 @@
  * Copyright © 2020 VMware, Inc. */
 
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "bareudp.h"
 #include "netlink-util.h"
--- a/src/network/netdev/batadv.c
+++ b/src/network/netdev/batadv.c
@@ -3,7 +3,7 @@
 #include <inttypes.h>
 #include <netinet/in.h>
 #include <linux/genetlink.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "batadv.h"
 #include "fileio.h"
--- a/src/network/netdev/bond.c
+++ b/src/network/netdev/bond.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "alloc-util.h"
 #include "bond.h"
--- a/src/network/netdev/bridge.c
+++ b/src/network/netdev/bridge.c
@@ -2,7 +2,7 @@
 
 #include <net/if.h>
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/if_bridge.h>
 
 #include "bridge.h"
--- a/src/network/netdev/dummy.c
+++ b/src/network/netdev/dummy.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "dummy.h"
 
--- a/src/network/netdev/geneve.c
+++ b/src/network/netdev/geneve.c
@@ -2,7 +2,7 @@
 
 #include <net/if.h>
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "alloc-util.h"
 #include "conf-parser.h"
--- a/src/network/netdev/ifb.c
+++ b/src/network/netdev/ifb.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "ifb.h"
 
--- a/src/network/netdev/ipoib.c
+++ b/src/network/netdev/ipoib.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/if_link.h>
 
 #include "ipoib.h"
--- a/src/network/netdev/ipvlan.c
+++ b/src/network/netdev/ipvlan.c
@@ -2,7 +2,7 @@
 
 #include <net/if.h>
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "conf-parser.h"
 #include "ipvlan.h"
--- a/src/network/netdev/macsec.c
+++ b/src/network/netdev/macsec.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/if_ether.h>
 #include <linux/if_macsec.h>
 #include <linux/genetlink.h>
--- a/src/network/netdev/macvlan.c
+++ b/src/network/netdev/macvlan.c
@@ -2,7 +2,7 @@
 
 #include <net/if.h>
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "conf-parser.h"
 #include "macvlan.h"
--- a/src/network/netdev/netdev.c
+++ b/src/network/netdev/netdev.c
@@ -2,7 +2,7 @@
 
 #include <net/if.h>
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <unistd.h>
 
 #include "alloc-util.h"
--- a/src/network/netdev/netdevsim.c
+++ b/src/network/netdev/netdevsim.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "netdevsim.h"
 
--- a/src/network/netdev/nlmon.c
+++ b/src/network/netdev/nlmon.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "nlmon.h"
 
--- a/src/network/netdev/tunnel.c
+++ b/src/network/netdev/tunnel.c
@@ -2,7 +2,7 @@
 
 #include <netinet/in.h>
 #include <linux/fou.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/if_tunnel.h>
 #include <linux/ip.h>
 #include <linux/ip6_tunnel.h>
--- a/src/network/netdev/vcan.c
+++ b/src/network/netdev/vcan.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "vcan.h"
 
--- a/src/network/netdev/veth.c
+++ b/src/network/netdev/veth.c
@@ -3,7 +3,7 @@
 #include <errno.h>
 #include <net/if.h>
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/veth.h>
 
 #include "netlink-util.h"
--- a/src/network/netdev/vlan.c
+++ b/src/network/netdev/vlan.c
@@ -2,7 +2,7 @@
 
 #include <errno.h>
 #include <net/if.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/if_vlan.h>
 
 #include "parse-util.h"
--- a/src/network/netdev/vrf.c
+++ b/src/network/netdev/vrf.c
@@ -2,7 +2,7 @@
 
 #include <net/if.h>
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "vrf.h"
 
--- a/src/network/netdev/vxcan.c
+++ b/src/network/netdev/vxcan.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/can/vxcan.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "vxcan.h"
 
--- a/src/network/netdev/vxlan.c
+++ b/src/network/netdev/vxlan.c
@@ -2,7 +2,7 @@
 
 #include <net/if.h>
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "conf-parser.h"
 #include "alloc-util.h"
--- a/src/network/netdev/wireguard.c
+++ b/src/network/netdev/wireguard.c
@@ -6,7 +6,7 @@
 #include <sys/ioctl.h>
 #include <net/if.h>
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/ipv6_route.h>
 
 #include "sd-resolve.h"
--- a/src/network/netdev/xfrm.c
+++ b/src/network/netdev/xfrm.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "missing_network.h"
 #include "xfrm.h"
--- a/src/network/networkd-bridge-mdb.c
+++ b/src/network/networkd-bridge-mdb.c
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <net/if.h>
-#include <linux/if_bridge.h>
 
 #include "netlink-util.h"
 #include "networkd-bridge-mdb.h"
@@ -11,6 +9,8 @@
 #include "networkd-queue.h"
 #include "string-util.h"
 #include "vlan-util.h"
+#include <net/if.h>
+#include <linux/if_bridge.h>
 
 #define STATIC_BRIDGE_MDB_ENTRIES_PER_NETWORK_MAX 1024U
 
--- a/src/network/networkd-dhcp-common.c
+++ b/src/network/networkd-dhcp-common.c
@@ -1,7 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
+#include <net/if.h>
 
 #include "bus-error.h"
 #include "bus-locator.h"
--- a/src/network/networkd-dhcp-prefix-delegation.c
+++ b/src/network/networkd-dhcp-prefix-delegation.c
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/ipv6_route.h>
-
 #include "sd-dhcp6-client.h"
 
 #include "hashmap.h"
@@ -21,6 +19,8 @@
 #include "strv.h"
 #include "tunnel.h"
 
+#include <linux/ipv6_route.h>
+
 bool link_dhcp_pd_is_enabled(Link *link) {
         assert(link);
 
--- a/src/network/networkd-dhcp-server.c
+++ b/src/network/networkd-dhcp-server.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/if.h>
 
 #include "sd-dhcp-server.h"
--- a/src/network/networkd-dhcp4.c
+++ b/src/network/networkd-dhcp4.c
@@ -3,7 +3,7 @@
 #include <netinet/in.h>
 #include <netinet/ip.h>
 #include <linux/if.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "alloc-util.h"
 #include "dhcp-client-internal.h"
--- a/src/network/networkd-ipv6ll.c
+++ b/src/network/networkd-ipv6ll.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/if.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "in-addr-util.h"
 #include "networkd-address.h"
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -3,7 +3,7 @@
 #include <net/if.h>
 #include <netinet/in.h>
 #include <linux/if.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/if_link.h>
 #include <linux/netdevice.h>
 #include <sys/socket.h>
--- a/src/network/networkd-ndisc.c
+++ b/src/network/networkd-ndisc.c
@@ -6,7 +6,7 @@
 #include <arpa/inet.h>
 #include <netinet/icmp6.h>
 #include <linux/if.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "sd-ndisc.h"
 
--- a/src/network/networkd-route.c
+++ b/src/network/networkd-route.c
@@ -1,9 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/icmpv6.h>
-#include <linux/ipv6_route.h>
-#include <linux/nexthop.h>
-
 #include "alloc-util.h"
 #include "event-util.h"
 #include "netlink-util.h"
@@ -21,6 +17,10 @@
 #include "vrf.h"
 #include "wireguard.h"
 
+#include <linux/icmpv6.h>
+#include <linux/ipv6_route.h>
+#include <linux/nexthop.h>
+
 int route_new(Route **ret) {
         _cleanup_(route_freep) Route *route = NULL;
 
--- a/src/network/networkd-setlink.c
+++ b/src/network/networkd-setlink.c
@@ -2,7 +2,7 @@
 
 #include <netinet/in.h>
 #include <linux/if.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/if_bridge.h>
 
 #include "missing_network.h"
--- a/src/shared/linux/ethtool.h
+++ b/src/shared/linux/ethtool.h
@@ -16,7 +16,8 @@
 
 #include <linux/const.h>
 #include <linux/types.h>
-#include <linux/if_ether.h>
+#include <netinet/if_ether.h>
+//#include <linux/if_ether.h>
 
 #ifndef __KERNEL__
 #include <limits.h> /* for INT_MAX */
--- a/src/shared/netif-util.c
+++ b/src/shared/netif-util.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/if.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "arphrd-util.h"
 #include "device-util.h"
--- a/src/udev/udev-builtin-net_id.c
+++ b/src/udev/udev-builtin-net_id.c
@@ -18,7 +18,7 @@
 #include <stdarg.h>
 #include <unistd.h>
 #include <linux/if.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/netdevice.h>
 #include <linux/pci_regs.h>
 
